package com.star.comtroller;

import com.star.entry.Resume;
import com.star.service.impl.ResumeServiceImpl;
import com.star.util.ResultObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SuppressWarnings("all")
@RestController
@RequestMapping("/resume/")
public class ResumeController {
    @Autowired
    private ResumeServiceImpl resumeService;
    @Autowired
    private ResultObject result;
    @RequestMapping("register")
    public ResultObject add(Resume resume){
        boolean b = resumeService.insert(resume);
        if(b){
            result.setStatus(400);
            result.setResult("生成成功");
        }else{
            result.setStatus(406);
            result.setResult("生成失败");
        }
        return result;
    }
}
